home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / Edje.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-01-09  |  9.3 KB  |  239 lines

  1. #ifndef _EDJE_H
  2. #define _EDJE_H
  3.  
  4. #include <Evas.h>
  5.  
  6. #ifdef EAPI
  7. #undef EAPI
  8. #endif
  9. #ifdef WIN32
  10. # ifdef BUILDING_DLL
  11. #  define EAPI __declspec(dllexport)
  12. # else
  13. #  define EAPI __declspec(dllimport)
  14. # endif
  15. #else
  16. # ifdef __GNUC__
  17. #  if __GNUC__ >= 4
  18. #   define EAPI __attribute__ ((visibility("default")))
  19. #  else
  20. #   define EAPI
  21. #  endif
  22. # else
  23. #  define EAPI
  24. # endif
  25. #endif
  26.  
  27. /* FIXDOC: Define these? */
  28. enum _Edje_Message_Type
  29. {
  30.    EDJE_MESSAGE_NONE = 0,
  31.      
  32.      EDJE_MESSAGE_SIGNAL = 1, /* DONT USE THIS */
  33.      
  34.      EDJE_MESSAGE_STRING = 2,
  35.      EDJE_MESSAGE_INT = 3,
  36.      EDJE_MESSAGE_FLOAT = 4,
  37.      
  38.      EDJE_MESSAGE_STRING_SET = 5,
  39.      EDJE_MESSAGE_INT_SET = 6,
  40.      EDJE_MESSAGE_FLOAT_SET = 7,
  41.      
  42.      EDJE_MESSAGE_STRING_INT = 8,
  43.      EDJE_MESSAGE_STRING_FLOAT = 9,
  44.      
  45.      EDJE_MESSAGE_STRING_INT_SET = 10,
  46.      EDJE_MESSAGE_STRING_FLOAT_SET = 11
  47. };
  48. typedef enum _Edje_Message_Type Edje_Message_Type;
  49.  
  50. typedef struct _Edje_Message_String           Edje_Message_String;
  51. typedef struct _Edje_Message_Int              Edje_Message_Int;
  52. typedef struct _Edje_Message_Float            Edje_Message_Float;
  53. typedef struct _Edje_Message_String_Set       Edje_Message_String_Set;
  54. typedef struct _Edje_Message_Int_Set          Edje_Message_Int_Set;
  55. typedef struct _Edje_Message_Float_Set        Edje_Message_Float_Set;
  56. typedef struct _Edje_Message_String_Int       Edje_Message_String_Int;
  57. typedef struct _Edje_Message_String_Float     Edje_Message_String_Float;
  58. typedef struct _Edje_Message_String_Int_Set   Edje_Message_String_Int_Set;
  59. typedef struct _Edje_Message_String_Float_Set Edje_Message_String_Float_Set;
  60.  
  61. struct _Edje_Message_String
  62. {
  63.    char *str;
  64. };
  65.  
  66. struct _Edje_Message_Int
  67. {
  68.    int val;
  69. };
  70.  
  71. struct _Edje_Message_Float
  72. {
  73.    double val;
  74. };
  75.  
  76. struct _Edje_Message_String_Set
  77. {
  78.    int count;
  79.    char *str[1];
  80. };
  81.  
  82. struct _Edje_Message_Int_Set
  83. {
  84.    int count;
  85.    int val[1];
  86. };
  87.  
  88. struct _Edje_Message_Float_Set
  89. {
  90.    int count;
  91.    double val[1];
  92. };
  93.  
  94. struct _Edje_Message_String_Int
  95. {
  96.    char *str;
  97.    int val;
  98. };
  99.  
  100. struct _Edje_Message_String_Float
  101. {
  102.    char *str;
  103.    double val;
  104. };
  105.  
  106. struct _Edje_Message_String_Int_Set
  107. {
  108.    char *str;
  109.    int count;
  110.    int val[1];
  111. };
  112.  
  113. struct _Edje_Message_String_Float_Set
  114. {
  115.    char *str;
  116.    int count;
  117.    double val[1];
  118. };
  119.  
  120. enum
  121. {
  122.    EDJE_DRAG_DIR_NONE = 0,
  123.      EDJE_DRAG_DIR_X = 1,
  124.      EDJE_DRAG_DIR_Y = 2,
  125.      EDJE_DRAG_DIR_XY = 3
  126. };
  127.  
  128. enum
  129. {
  130.    EDJE_LOAD_ERROR_NONE = 0,
  131.      EDJE_LOAD_ERROR_GENERIC = 1,
  132.      EDJE_LOAD_ERROR_DOES_NOT_EXIST = 2,
  133.      EDJE_LOAD_ERROR_PERMISSION_DENIED = 3,
  134.      EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED = 4,
  135.      EDJE_LOAD_ERROR_CORRUPT_FILE = 5,
  136.      EDJE_LOAD_ERROR_UNKNOWN_FORMAT = 6,
  137.      EDJE_LOAD_ERROR_INCOMPATIBLE_FILE = 7,
  138.      EDJE_LOAD_ERROR_UNKNOWN_COLLECTION = 8
  139. };
  140.  
  141. #ifdef __cplusplus
  142. extern "C" {
  143. #endif
  144.    
  145.    /* edje_main.c */
  146.    EAPI int          edje_init                       (void);
  147.    EAPI int          edje_shutdown                   (void);
  148.    
  149.    /* edje_program.c */
  150.    EAPI void         edje_frametime_set              (double t);
  151.    EAPI double       edje_frametime_get              (void);
  152.    
  153.    /* edje_util.c */
  154.    EAPI void         edje_freeze                     (void);
  155.    EAPI void         edje_thaw                       (void);
  156.    EAPI void         edje_fontset_append_set         (char *fonts);
  157.    EAPI const char  *edje_fontset_append_get         (void);
  158.    
  159.    /* edje_load.c */
  160.    EAPI Evas_List   *edje_file_collection_list       (const char *file);
  161.    EAPI void         edje_file_collection_list_free  (Evas_List *lst);
  162.    EAPI char        *edje_file_data_get              (const char *file, const char *key);
  163.    EAPI void         edje_file_cache_set             (int count);
  164.    EAPI int          edje_file_cache_get             (void);
  165.    EAPI void         edje_file_cache_flush           (void);
  166.    EAPI void         edje_collection_cache_set       (int count);
  167.    EAPI int          edje_collection_cache_get       (void);
  168.    EAPI void         edje_collection_cache_flush     (void);
  169.        
  170.    
  171.    /* edje_util.c */
  172.    EAPI void         edje_color_class_set(const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3);
  173.    EAPI void         edje_text_class_set(const char *text_class, const char *font, Evas_Font_Size size);
  174.    EAPI void         edje_extern_object_min_size_set (Evas_Object *obj, Evas_Coord minw, Evas_Coord minh);
  175.    EAPI void         edje_extern_object_max_size_set (Evas_Object *obj, Evas_Coord maxw, Evas_Coord maxh);
  176.    
  177.    /* edje_smart.c */
  178.    EAPI Evas_Object *edje_object_add                 (Evas *evas);
  179.    
  180.    /* edje_util.c */
  181.    EAPI const char  *edje_object_data_get            (Evas_Object *obj, const char *key);
  182.    
  183.    /* edje_load.c */
  184.    EAPI int          edje_object_file_set            (Evas_Object *obj, const char *file, const char *part);
  185.    EAPI void         edje_object_file_get            (Evas_Object *obj, const char **file, const char **part);
  186.    EAPI int          edje_object_load_error_get      (Evas_Object *obj);
  187.    
  188.    /* edje_program.c */
  189.    EAPI void         edje_object_signal_callback_add (Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *obj, const char *emission, const char *source), void *data);
  190.    EAPI void        *edje_object_signal_callback_del (Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *obj, const char *emission, const char *source));
  191.    EAPI void         edje_object_signal_emit         (Evas_Object *obj, const char *emission, const char *source);
  192.    EAPI void         edje_object_play_set            (Evas_Object *obj, int play);
  193.    EAPI int          edje_object_play_get            (Evas_Object *obj);
  194.    EAPI void         edje_object_animation_set       (Evas_Object *obj, int on);
  195.    EAPI int          edje_object_animation_get       (Evas_Object *obj);
  196.    
  197.    /* edje_util.c */
  198.    EAPI int          edje_object_freeze              (Evas_Object *obj);
  199.    EAPI int          edje_object_thaw                (Evas_Object *obj);
  200.    EAPI void         edje_object_color_class_set     (Evas_Object *obj, const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3);
  201.    EAPI void         edje_object_text_class_set      (Evas_Object *obj, const char *text_class, const char *font, Evas_Font_Size size);
  202.    EAPI void         edje_object_size_min_get        (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh);
  203.    EAPI void         edje_object_size_max_get        (Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh);
  204.    EAPI void         edje_object_calc_force          (Evas_Object *obj);
  205.    EAPI void         edje_object_size_min_calc       (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh);
  206.    EAPI int          edje_object_part_exists         (Evas_Object *obj, const char *part);
  207.    EAPI void         edje_object_part_geometry_get   (Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
  208.    EAPI void         edje_object_text_change_cb_set  (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, const char *part), void *data);
  209.    EAPI void         edje_object_part_text_set       (Evas_Object *obj, const char *part, const char *text);
  210.    EAPI const char  *edje_object_part_text_get       (Evas_Object *obj, const char *part);
  211.    EAPI void         edje_object_part_swallow        (Evas_Object *obj, const char *part, Evas_Object *obj_swallow);
  212.    EAPI void         edje_object_part_unswallow      (Evas_Object *obj, Evas_Object *obj_swallow);
  213.    EAPI Evas_Object *edje_object_part_swallow_get    (Evas_Object *obj, const char *part);
  214.    EAPI const char  *edje_object_part_state_get      (Evas_Object *obj, const char *part, double *val_ret);
  215.    EAPI int          edje_object_part_drag_dir_get   (Evas_Object *obj, const char *part);
  216.    EAPI void         edje_object_part_drag_value_set (Evas_Object *obj, const char *part, double dx, double dy);
  217.    EAPI void         edje_object_part_drag_value_get (Evas_Object *obj, const char *part, double *dx, double *dy);
  218.    EAPI void         edje_object_part_drag_size_set  (Evas_Object *obj, const char *part, double dw, double dh);
  219.    EAPI void         edje_object_part_drag_size_get  (Evas_Object *obj, const char *part, double *dw, double *dh);
  220.    EAPI void         edje_object_part_drag_step_set  (Evas_Object *obj, const char *part, double dx, double dy);
  221.    EAPI void         edje_object_part_drag_step_get  (Evas_Object *obj, const char *part, double *dx, double *dy);
  222.    EAPI void         edje_object_part_drag_page_set  (Evas_Object *obj, const char *part, double dx, double dy);
  223.    EAPI void         edje_object_part_drag_page_get  (Evas_Object *obj, const char *part, double *dx, double *dy);
  224.    EAPI void         edje_object_part_drag_step      (Evas_Object *obj, const char *part, double dx, double dy);
  225.    EAPI void         edje_object_part_drag_page      (Evas_Object *obj, const char *part, double dx, double dy);
  226.    
  227.    /* edje_message_queue.c */
  228.    EAPI void         edje_object_message_send           (Evas_Object *obj, Edje_Message_Type type, int id, void *msg);
  229.    EAPI void         edje_object_message_handler_set    (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg), void *data);
  230.    EAPI void         edje_object_message_signal_process (Evas_Object *obj);
  231.    
  232.    EAPI void         edje_message_signal_process        (void);
  233.    
  234. #ifdef __cplusplus
  235. }
  236. #endif
  237.  
  238. #endif
  239.